// NFC_03 [FrameWindow].nova // Using namespace declarations. using Library.NFC; // The application class. class FrameWindowApp { // Static data members. private static FrameWindow window; private static Graphics graphics; // Application class's "main" function. public static void main( String[] args ) { // Create a new frame window. window = new FrameWindow( "NFC_03 [FrameWindow]", 320, 240 ); // Get the graphics context from the new window. graphics = window.getGraphics( ); // Set some static callback methods for the window. window.setCloseCallback( close ); // window.setIdleCallback( idle ); // Uncomment this to enable the idle callback. window.setKeyDownCallback( keyDown ); window.setPaintCallback( paint ); // Show the window. window.show( true ); // Process the window's events. window.processEvents( ); } // Static idle callback. private static void idle( Component sender ) { Stream.writeLine( "idle( )" ); } // Static close callback. private static void close( Component sender ) { Stream.writeLine( "close( )" ); } // Static key down callback. private static void keyDown( Component sender, uint key ) { Stream.writeLine( UInteger.toString( key ) ); } // Static paint callback. private static void paint( Component sender ) { graphics.drawString( "FrameWindow", 50, 25 ); } }